package com.tzbank.wisdom.controller;

import com.tzbank.wisdom.service.CreditCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * zhangzehuan
 */
@Api(tags = {"信用卡"})
@RequestMapping("credit")
@RestController
public class CreditCardController {
    @Autowired
    private CreditCardService creditCardService;

    /**
     * 信用卡额度查询
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getCreditCardLmt")
    @ApiOperation(value = "信用卡额度查询", notes = "信用卡额度查询接口")
    public Map<String, Object> getCreditCardLmt(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getCreditCardLmt(reqBody);
    }

    /**
     * 信用卡分期计划
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getInstlPlan")
    @ApiOperation(value = "信用卡分期计划", notes = "信用卡分期计划接口")
    public Map<String, Object> getInstlPlan(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getInstlPlan(reqBody);
    }

    /**
     * 信用卡分期试算
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/instlTrial")
    @ApiOperation(value = "信用卡分期试算", notes = "信用卡分期试算接口")
    public Map<String, Object> instlTrial(@RequestBody Map<String, String> reqBody) {
        return creditCardService.instlTrial(reqBody);
    }

    /**
     * 信用卡可灵活分期账单查询
     * saveFiexBillInstl
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getInstlBill")
    @ApiOperation(value = "信用卡可灵活分期账单查询", notes = "信用卡可灵活分期账单查询接口")
    public Map<String, Object> getInstlBill(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getInstlBill(reqBody);
    }

    /**
     * 信用卡还款
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/creditRepay")
    @ApiOperation(value = "信用卡还款", notes = "信用卡还款接口")
    public Map<String, Object> careditRepay(@RequestBody Map<String, String> reqBody) {
        return creditCardService.creditRepay(reqBody);
    }

    /**
     * 账单分期申请提交
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/saveBillInstl")
    @ApiOperation(value = "账单分期申请提交", notes = "账单分期申请提交接口")
    public Map<String, Object> saveBillInstl(@RequestBody Map<String, String> reqBody) {
        return creditCardService.saveBillInstl(reqBody);
    }

    /**
     * 未出账单查询
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getBill")
    @ApiOperation(value = "未出账单查询", notes = "未出账单查询接口")
    public Map<String, Object> getBill(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getBill(reqBody);
    }

    /**
     * 已出账单查询
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getOutBill")
    @ApiOperation(value = "已出账单查询", notes = "已出账单查询接口")
    public Map<String, Object> getOutBill(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getOutBill(reqBody);
    }

    /**
     * 已出账单total查询
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getOutBillTotal")
    @ApiOperation(value = "已出账单total查询", notes = "已出账单total查询接口")
    public Map<String, Object> getOutBillTotal(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getOutBillTotal(reqBody);
    }
    /**
     * 已出账单分期信息查询
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/instlOutBillInfo")
    @ApiOperation(value = "已出账单分期信息查询", notes = "已出账单分期信息查询接口")
    public Map<String, Object> instlOutBillInfo(@RequestBody Map<String, String> reqBody) {
        return creditCardService.instlOutBillInfo(reqBody);
    }
    /**
     * 还款自动签约
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getAutoRepay")
    @ApiOperation(value = "还款自动签约", notes = "还款自动签约接口")
    public Map<String, Object> getAutoRepay(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getAutoRepay(reqBody);
    }

    /**
     * 我的信用卡
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getCreditCardInfo")
    @ApiOperation(value = "我的信用卡", notes = "我的信用卡接口")
    public Map<String, Object> getCreditCardInfo(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getCreditCardInfo(reqBody);
    }

    /**
     * 账单可分期余额查询
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/getInstlBillAmt")
    @ApiOperation(value = "账单可分期余额查询", notes = "账单可分期余额查询接口")
    public Map<String, Object> getInstlBillAmt(@RequestBody Map<String, String> reqBody) {
        return creditCardService.getInstlBillAmt(reqBody);
    }

    /**
     * 信用卡可灵活分期账单查询
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/saveFiexBillInstl")
    @ApiOperation(value = "灵活分期申请提交", notes = "灵活分期申请提交接口")
    public Map<String, Object> saveFiexBillInstl(@RequestBody Map<String, String> reqBody) {
        return creditCardService.saveFiexBillInstl(reqBody);
    }

    /**
     * 信用卡转出
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/creditCardOut")
    @ApiOperation(value = "信用卡转出", notes = "信用卡转出接口")
    public Map<String, Object> creditCardOut(@RequestBody Map<String, String> reqBody) {
        return creditCardService.creditCardOut(reqBody);
    }

    /**
     * 信用卡账单寄送
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/sendBill")
    @ApiOperation(value = "信用卡账单寄送", notes = "信用卡账单寄送接口")
    public Map<String, Object> sendBill(@RequestBody Map<String, String> reqBody) {
        return creditCardService.sendBill(reqBody);
    }
}
